package com.blqy.fr.account.api;

import com.blqy.fr.account.service.UserBillService;
import com.blqy.fr.common.result.Result;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Tag(name = "用户账户管理")
@RestController
@RequestMapping("api/account/userAccount")
@SuppressWarnings({"unchecked", "rawtypes"})
public class UserBillApiController {

	@Autowired
	private UserBillService userBillService;

	@PostMapping("saveAccount/{userId}")
	public Result saveAccount(@PathVariable Long userId){
		this.userBillService.saveAccount(userId);
		return Result.ok();
	}

	@PostMapping("init/{userId}")
	public Result init(@PathVariable Long userId) {
		this.userBillService.initAccount(userId);
		return Result.ok();
	}
}

